﻿namespace KingerRobot.MexicoSailunMDC.Spi;
/// <summary>
/// 出库服务
/// </summary>
public interface IWarehousingOutService
{
    /// <summary>
    /// 出库任务创建
    /// </summary>
    void CreateTask();
    /// <summary>
    /// 出库任务执行
    /// </summary>
    /// <param name="taskNo">任务编号</param>
    /// <param name="locId">位置</param>
    int ExecuteTask(int taskNo, long locId);
    /// <summary>
    /// 执行失败回滚
    /// </summary>
    /// <param name="taskNo"></param>
    /// <param name="locId"></param>
    /// <returns></returns>
    int RollExecuteTask(int taskNo, long locId);
    /// <summary>
    /// 绑定放胎位
    /// </summary>
    /// <param name="taskNo"></param>
    /// <param name="locId"></param>
    /// <returns></returns>
    int BindOutTask(int taskNo, long locId);

    /// <summary>
    /// 出库任务完成
    /// </summary>
    /// <param name="taskNo">任务编号</param>
    /// <param name="locId">位置</param>
    int FinishTask(int taskNo, long locId);

    /// <summary>
    /// 删除无效出库订单(先备份再删除)
    /// </summary>
    void DeleteInvalidOutOrder();
    /// <summary>
    /// 删除无效出库任务
    /// </summary>
    void DeleteInvalidTask();
    /// <summary>
    /// 请料生成出库订单
    /// </summary>
    void CreateOutSummaries();
}
